cmake_minimum_required(VERSION 3.16)
project(DINGHAN_CAMERA)

add_definitions(-DDHVIDEO_EXPORT -D_LIB)
SET(CMAKE_BUILD_TYPE "MinSizeRel")
if(NOT CMAKE_CL_64)
add_link_options( /SAFESEH:NO)
endif()


include_directories("../mfx_dispatch")
include_directories("D:/Program Files/boost_1.72.0")
include_directories("D:/DH_Work/OpenSource/ffmpeg/libffmpeg/include")
include_directories("D:/DH_Work/OpenSource/libyuv/include")
include_directories("D:/DH_Work/OpenSource/opencv/build/install/include")

set(code decode.cpp test.cpp)

link_directories("D:/DH_Work/OpenSource/ffmpeg/libffmpeg/lib_X64")
link_directories("D:/Program Files/boost_1.72.0/stage/lib")
link_directories("D:/DH_Work/OpenSource/libyuv/build_x64/Debug")
link_directories("D:/DH_Work/OpenSource/opencv/build/install/x64/vc16/lib")

add_executable(decode ${code})
target_link_libraries(decode 
    avcodec.lib avfilter.lib avformat.lib avutil.lib swscale.lib swresample.lib avdevice.lib
    opencv_core440d.lib opencv_imgproc440d.lib opencv_imgcodecs440d.lib opencv_photo440d.lib opencv_highgui440d.lib
)